import EventRoute from '../EventRoute'
const routers: EventRoute[] = []

// 拖拽ai问答窗口
// 开始拖拽
routers.push(
  new EventRoute('aiChat-window-start-drag', (api) => {
    api.aiChatWindow.startDrag()
  })
)
// 移动拖拽
routers.push(
  new EventRoute('aiChat-window-move-drag', (api) => {
    api.aiChatWindow.moveDrag()
  })
)
// 结束拖拽
routers.push(
  new EventRoute('aiChat-window-stop-drag', (api) => {
    api.aiChatWindow.stopDrag()
  })
)

// 关闭ai助手窗口
routers.push(
  new EventRoute('close-aiChat-window', (api) => {
    api.aiChatWindow.hide()
    api.aiIconWindow.show()
  })
)

// 打开ai助手窗口
routers.push(
  new EventRoute('open-aiChat-window', (api) => {
    const position = api.aiIconWindow.getPosition()
    api.aiChatWindow.showAiChat(position[0], position[1])
    api.aiChatWindow.show()
    api.aiIconWindow.hide()
  })
)
export default routers
